import request from '@/utils/request'

// 查询人气推荐商品列表
export function listRecommend(query) {
  return request({
    url: '/sale/recommend/list',
    method: 'get',
    params: query
  })
}

// 查询人气推荐商品详细
export function getRecommend(id) {
  return request({
    url: '/sale/recommend/' + id,
    method: 'get'
  })
}

// 新增人气推荐商品
export function addRecommend(data) {
  return request({
    url: '/sale/recommend',
    method: 'post',
    data: data
  })
}
// 批量新增人气推荐商品
export function BatchAddRecommend(data) {
  return request({
    url: '/sale/recommend/batchSave',
    method: 'post',
    data: data
  })
}

// 修改人气推荐商品
export function updateRecommend(data) {
  return request({
    url: '/sale/recommend',
    method: 'put',
    data: data
  })
}



// 删除人气推荐商品
export function delRecommend(id) {
  return request({
    url: '/sale/recommend/' + id,
    method: 'delete'
  })
}
